From: Florian Müllner Date: Fri, 3 Jun 2022 14:15:38 +0000 (+0200) Subject: theme: Include both dark and light variant in resource X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~337^2~2^2~63 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d76f309dba597c760d92fda7338a6904dafaf0e5;p=gnome-shell.git theme: Include both dark and light variant in resource This will allow us to switch between the variants according to the color-scheme setting. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5545 Part-of: --- diff --git a/data/gnome-shell-theme.gresource.xml b/data/gnome-shell-theme.gresource.xml index 24b3be8db..8a4948e41 100644 --- a/data/gnome-shell-theme.gresource.xml +++ b/data/gnome-shell-theme.gresource.xml @@ -9,7 +9,8 @@ checkbox-off-focused.svg checkbox-off-light.svg checkbox-off.svg - gnome-shell.css + gnome-shell-dark.css + gnome-shell-light.css gnome-shell-high-contrast.css gnome-shell-start.svg pad-osd.css diff --git a/data/theme/gnome-shell-dark.scss b/data/theme/gnome-shell-dark.scss new file mode 100644 index 000000000..8ee499912 --- /dev/null +++ b/data/theme/gnome-shell-dark.scss @@ -0,0 +1,6 @@ +$variant: 'dark'; + +@import "gnome-shell-sass/_colors"; //use gtk colors +@import "gnome-shell-sass/_drawing"; +@import "gnome-shell-sass/_common"; +@import "gnome-shell-sass/_widgets"; diff --git a/data/theme/gnome-shell-light.scss b/data/theme/gnome-shell-light.scss new file mode 100644 index 000000000..ae6fce7dd --- /dev/null +++ b/data/theme/gnome-shell-light.scss @@ -0,0 +1,6 @@ +$variant: 'light'; + +@import "gnome-shell-sass/_colors"; //use gtk colors +@import "gnome-shell-sass/_drawing"; +@import "gnome-shell-sass/_common"; +@import "gnome-shell-sass/_widgets"; diff --git a/data/theme/gnome-shell.scss b/data/theme/gnome-shell.scss deleted file mode 100644 index 8ee499912..000000000 --- a/data/theme/gnome-shell.scss +++ /dev/null @@ -1,6 +0,0 @@ -$variant: 'dark'; - -@import "gnome-shell-sass/_colors"; //use gtk colors -@import "gnome-shell-sass/_drawing"; -@import "gnome-shell-sass/_common"; -@import "gnome-shell-sass/_widgets"; diff --git a/data/theme/meson.build b/data/theme/meson.build index b7cd5487b..0d28efd03 100644 --- a/data/theme/meson.build +++ b/data/theme/meson.build @@ -1,6 +1,7 @@ theme_sources = files([ 'gnome-shell-high-contrast.scss', - 'gnome-shell.scss', + 'gnome-shell-dark.scss', + 'gnome-shell-light.scss', 'gnome-shell-sass/_colors.scss', 'gnome-shell-sass/_common.scss', 'gnome-shell-sass/_drawing.scss', @@ -43,7 +44,8 @@ theme_sources = files([ stylesheets = [ 'gnome-shell-high-contrast.css', - 'gnome-shell.css' + 'gnome-shell-dark.css', + 'gnome-shell-light.css', ] foreach stylesheet: stylesheets diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js index 8c8b6e4fc..83786a5c7 100644 --- a/js/ui/sessionMode.js +++ b/js/ui/sessionMode.js @@ -22,7 +22,7 @@ if (Config.HAVE_NETWORKMANAGER) const _modes = { 'restrictive': { parentMode: null, - stylesheetName: 'gnome-shell.css', + stylesheetName: 'gnome-shell-dark.css', themeResourceName: 'gnome-shell-theme.gresource', hasOverview: false, showCalendarEvents: false, diff --git a/meson/generate-stylesheets.py b/meson/generate-stylesheets.py index bd6b641b8..10e65b756 100644 --- a/meson/generate-stylesheets.py +++ b/meson/generate-stylesheets.py @@ -6,7 +6,8 @@ import subprocess stylesheets = [ 'data/theme/gnome-shell-high-contrast.css', - 'data/theme/gnome-shell.css' + 'data/theme/gnome-shell-dark.css', + 'data/theme/gnome-shell-light.css' ] sourceroot = os.environ.get('MESON_SOURCE_ROOT')